CREATE TABLE [dbo].[sec_user_t](
	[cCompanyID] [varchar](20) not NULL default '',
	[UserID] [varchar](20) NOT NULL default '',
	[RoleID] [varchar](10) not NULL default '',
	[Description] [varchar](50) not NULL default '',
	[lDefault] [bit] not NULL default 0
)	
	
insert	sec_user_t
select	B.cCompanyID, A.UserID, A.RoleID, Description, 1
from	sec_user A
join	SEC_COMPANYACCESS B on A.UserID = B.UserID
join	SEC_ROLE C on A.RoleID = C.RoleID
order by	B.cCompanyID, A.UserID

